#!/bin/bash
source /root/.bash_profile
echo "`date +"%Y/%m/%d %H:%M:%S"` 触发脚本: $0" >> /home/root/gzb/schedule/scriptStartTime.log

finished_date=`date +%Y%m%d`

if [ -z "$1" ]; then
	startTime=`date -d "6 hour ago " "+%Y/%m/%d %H:00:00"`
	endTime=`date -d "1 hour ago" "+%Y/%m/%d %H:59:59"`
else
	startTime=$1
	endTime=$2
fi

echo "统计时间范围: $startTime - $endTime"
file="finished"_$finished_date
logfile="tmplog"_$finished_date

#配置当前任务id
TASKID=JJYX6

cd /home/root/gzb/schedule/gzbDataAnalyse
nohup /opt/module/jdk1.8.0_191/bin/java -Dtaskid=${TASKID}-1 -jar -Xss15m gzbDataAnalyse-1.0-SNAPSHOT-jar-with-dependencies.jar "${startTime}" "${endTime}" '1' 'all' 'all' 2>&1 &

cd /home/root/gzb/schedule/gzbDataAnalyse
nohup /opt/module/jdk1.8.0_191/bin/java -Dtaskid=${TASKID}-2 -jar -Xss15m gzbDataAnalyse-1.0-SNAPSHOT-jar-with-dependencies.jar "${startTime}" "${endTime}" '1' 'all2' 'all' 2>&1 &
